package com.pingan.haofang.searchcloud.batch.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;

import com.pingan.haofang.searchcloud.batch.common.Batch;

import javax.annotation.PostConstruct;

/**
 * 定时任务刷新
 * 
 * @author LUYI374
 * @date 2017年5月8日
 * @since 1.0.0
 */
@Batch(value = "demoScheduleTask", permanent = true)
@ConditionalOnProperty("demoScheduleTask")
public class DemoScheduleTaskRunner {

    static Logger LOG = LoggerFactory.getLogger(DemoScheduleTaskRunner.class);

    @Scheduled(initialDelay = 10000, fixedDelay = 1000)
    @PostConstruct
    public void run() {
        System.out.println(System.currentTimeMillis());
    }

}
